home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / k3bisooptions.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-05-27  |  7.8 KB  |  184 lines

  1. /* 
  2.  *
  3.  * $Id: k3bisooptions.h 619556 2007-01-03 17:38:12Z trueg $
  4.  * Copyright (C) 2003 Sebastian Trueg <trueg@k3b.org>
  5.  *
  6.  * This file is part of the K3b project.
  7.  * Copyright (C) 1998-2007 Sebastian Trueg <trueg@k3b.org>
  8.  *
  9.  * This program is free software; you can redistribute it and/or modify
  10.  * it under the terms of the GNU General Public License as published by
  11.  * the Free Software Foundation; either version 2 of the License, or
  12.  * (at your option) any later version.
  13.  * See the file "COPYING" for the exact licensing terms.
  14.  */
  15.  
  16. #ifndef K3B_ISO_OPTIONS_H
  17. #define K3B_ISO_OPTIONS_H
  18.  
  19. #include <qstring.h>
  20. #include "k3b_export.h"
  21.  
  22. class KConfigBase;
  23.  
  24.  
  25. class LIBK3B_EXPORT K3bIsoOptions
  26. {
  27.  public:
  28.   K3bIsoOptions();
  29.  
  30.   bool forceInputCharset() const { return m_bForceInputCharset; }
  31.   const QString& inputCharset() const { return m_inputCharset; }
  32.  
  33.   void setForceInputCharset( bool b ) { m_bForceInputCharset = b; }
  34.   void setInputCharset( const QString& cs ) { m_inputCharset = cs; }
  35.  
  36.     
  37.   // -- mkisofs-options ----------------------------------------------------------------------
  38.   bool createRockRidge() const { return m_createRockRidge; }
  39.   bool createJoliet() const { return m_createJoliet; }
  40.   bool createUdf() const { return m_createUdf; }
  41.   bool ISOallowLowercase() const { return m_ISOallowLowercase || ISOuntranslatedFilenames(); }
  42.   bool ISOallowPeriodAtBegin() const { return m_ISOallowPeriodAtBegin || ISOuntranslatedFilenames(); }
  43.   bool ISOallow31charFilenames() const { return m_ISOallow31charFilenames || ISOmaxFilenameLength() || ISOuntranslatedFilenames(); }
  44.   bool ISOomitVersionNumbers() const { return m_ISOomitVersionNumbers || ISOmaxFilenameLength(); }
  45.   bool ISOomitTrailingPeriod() const { return m_ISOomitTrailingPeriod || ISOuntranslatedFilenames(); }
  46.   bool ISOmaxFilenameLength() const { return m_ISOmaxFilenameLength || ISOuntranslatedFilenames(); }
  47.   bool ISOrelaxedFilenames() const { return m_ISOrelaxedFilenames || ISOuntranslatedFilenames(); }
  48.   bool ISOnoIsoTranslate() const { return m_ISOnoIsoTranslate; }
  49.   bool ISOallowMultiDot() const { return m_ISOallowMultiDot || ISOuntranslatedFilenames(); }
  50.   bool ISOuntranslatedFilenames() const { return m_ISOuntranslatedFilenames; }
  51.   bool followSymbolicLinks() const { return m_followSymbolicLinks; }
  52.   bool createTRANS_TBL() const { return m_createTRANS_TBL; }
  53.   bool hideTRANS_TBL() const { return m_hideTRANS_TBL; }
  54.   bool jolietLong() const { return m_jolietLong; }
  55.  
  56.   bool preserveFilePermissions() const { return m_preserveFilePermissions; }
  57.  
  58.   int ISOLevel() const { return m_isoLevel; }
  59.   const QString& systemId() const { return m_systemId; }
  60.   const QString& applicationID() const { return m_applicationID; }
  61.   const QString& volumeID() const { return m_volumeID; }
  62.   const QString& volumeSetId() const { return m_volumeSetId; }
  63.   int volumeSetSize() const { return m_volumeSetSize; }
  64.   int volumeSetNumber() const { return m_volumeSetNumber; }
  65.   const QString& publisher() const { return m_publisher; }
  66.   const QString& preparer() const { return m_preparer; }
  67.   const QString& abstractFile() const { return m_abstractFile; }
  68.   const QString& copyrightFile() const { return m_copyrightFile; }
  69.   const QString& bibliographFile() const { return m_bibliographFile; }
  70.     
  71.   void setCreateRockRidge( bool b ) { m_createRockRidge = b; }
  72.   void setCreateJoliet( bool b ) {  m_createJoliet = b; }
  73.   void setCreateUdf( bool b ) { m_createUdf = b; }
  74.   void setISOallowLowercase( bool b ) {  m_ISOallowLowercase = b; }
  75.   void setISOallowPeriodAtBegin( bool b ) {  m_ISOallowPeriodAtBegin = b; }
  76.   void setISOallow31charFilenames( bool b ) {  m_ISOallow31charFilenames = b; }
  77.   void setISOomitVersionNumbers( bool b ) {  m_ISOomitVersionNumbers = b; }
  78.   void setISOomitTrailingPeriod( bool b ) {  m_ISOomitTrailingPeriod = b; }
  79.   void setISOmaxFilenameLength( bool b ) {  m_ISOmaxFilenameLength = b; }
  80.   void setISOrelaxedFilenames( bool b ) {  m_ISOrelaxedFilenames = b; }
  81.   void setISOnoIsoTranslate( bool b ) {  m_ISOnoIsoTranslate = b; }
  82.   void setISOallowMultiDot( bool b ) {  m_ISOallowMultiDot = b; }
  83.   void setISOuntranslatedFilenames( bool b ) {  m_ISOuntranslatedFilenames = b; }
  84.   void setFollowSymbolicLinks( bool b ) {  m_followSymbolicLinks = b; }
  85.   void setCreateTRANS_TBL( bool b ) {  m_createTRANS_TBL = b; }
  86.   void setHideTRANS_TBL( bool b ) {  m_hideTRANS_TBL = b; }
  87.   void setJolietLong( bool b ) { m_jolietLong = b; }
  88.     
  89.   void setISOLevel( int i ) { m_isoLevel = i; }
  90.   void setSystemId( const QString& s ) { m_systemId = s; }
  91.   void setApplicationID( const QString& s ) { m_applicationID = s; }
  92.  
  93.   /**
  94.    * Set the filesystems volume id.
  95.    *
  96.    * max length for this field is 32 chars.
  97.    */
  98.   void setVolumeID( const QString& s ) { m_volumeID = s; }
  99.   void setVolumeSetId( const QString& s ) { m_volumeSetId = s; }
  100.   void setVolumeSetSize( int size ) { m_volumeSetSize = size; }
  101.   void setVolumeSetNumber( int n ) { m_volumeSetNumber = n; }
  102.   void setPublisher( const QString& s ) { m_publisher = s; }
  103.   void setPreparer( const QString& s ) { m_preparer = s; }
  104.   void setAbstractFile( const QString& s ) { m_abstractFile = s; }
  105.   void setCoprightFile( const QString& s ) { m_copyrightFile = s; }
  106.   void setBibliographFile( const QString& s ) { m_bibliographFile = s; }
  107.  
  108.   void setPreserveFilePermissions( bool b ) { m_preserveFilePermissions = b; }
  109.   // ----------------------------------------------------------------- mkisofs-options -----------
  110.  
  111.   enum whiteSpaceTreatments { noChange = 0, replace = 1, strip = 2, extended = 3 };
  112.  
  113.   void setWhiteSpaceTreatment( int i ) { m_whiteSpaceTreatment = i; }
  114.   int whiteSpaceTreatment() const { return m_whiteSpaceTreatment; }
  115.   const QString& whiteSpaceTreatmentReplaceString() const { return m_whiteSpaceTreatmentReplaceString; }
  116.   void setWhiteSpaceTreatmentReplaceString( const QString& s ) { m_whiteSpaceTreatmentReplaceString = s; }
  117.  
  118.   bool discardSymlinks() const { return m_discardSymlinks; }
  119.   void setDiscardSymlinks( bool b ) { m_discardSymlinks = b; }
  120.  
  121.   bool discardBrokenSymlinks() const { return m_discardBrokenSymlinks; }
  122.   void setDiscardBrokenSymlinks( bool b ) { m_discardBrokenSymlinks = b; }
  123.  
  124.   bool doNotCacheInodes() const { return m_doNotCacheInodes; }
  125.   void setDoNotCacheInodes( bool b ) { m_doNotCacheInodes = b; }
  126.  
  127.   void save( KConfigBase* c, bool saveVolumeDesc = true );
  128.  
  129.   static K3bIsoOptions load( KConfigBase* c, bool loadVolumeDesc = true );
  130.   static K3bIsoOptions defaults();
  131.  
  132.  private:
  133.   // volume descriptor
  134.   QString m_volumeID;
  135.   QString m_applicationID;
  136.   QString m_preparer;
  137.   QString m_publisher;
  138.   QString m_systemId;
  139.   QString m_volumeSetId;
  140.   QString m_abstractFile;
  141.   QString m_copyrightFile;
  142.   QString m_bibliographFile;
  143.  
  144.   int m_volumeSetSize;
  145.   int m_volumeSetNumber;    
  146.  
  147.   bool m_bForceInputCharset;
  148.   QString m_inputCharset;
  149.  
  150.   // mkisofs options -------------------------------------
  151.   bool m_createRockRidge;    // -r or -R
  152.   bool m_createJoliet;             // -J
  153.   bool m_createUdf;                // -udf
  154.   bool m_ISOallowLowercase;   // -allow-lowercase
  155.   bool m_ISOallowPeriodAtBegin;   // -L
  156.   bool m_ISOallow31charFilenames;  // -I
  157.   bool m_ISOomitVersionNumbers;   // -N
  158.   bool m_ISOomitTrailingPeriod;   // -d
  159.   bool m_ISOmaxFilenameLength;     // -max-iso9660-filenames (forces -N)
  160.   bool m_ISOrelaxedFilenames;      // -relaxed-filenames
  161.   bool m_ISOnoIsoTranslate;        // -no-iso-translate
  162.   bool m_ISOallowMultiDot;          // -allow-multidot
  163.   bool m_ISOuntranslatedFilenames;   // -U (forces -d, -I, -L, -N, -relaxed-filenames, -allow-lowercase, -allow-multidot, -no-iso-translate)
  164.   bool m_followSymbolicLinks;       // -f
  165.   bool m_createTRANS_TBL;    // -T
  166.   bool m_hideTRANS_TBL;    // -hide-joliet-trans-tbl
  167.  
  168.   bool m_preserveFilePermissions;   // if true -R instead of -r is used
  169.   bool m_jolietLong;
  170.  
  171.   bool m_doNotCacheInodes;
  172.     
  173.   int m_isoLevel;
  174.  
  175.  
  176.   int m_whiteSpaceTreatment;
  177.   QString m_whiteSpaceTreatmentReplaceString;
  178.  
  179.   bool m_discardSymlinks;
  180.   bool m_discardBrokenSymlinks;
  181. };
  182.  
  183. #endif
  184.